package TutorialPoint;


public class Puppy {
	int puppyAge;
	
	public Puppy(String name){
		System.out.println("Puppy Name is:" + name);
	}
	
	public void setAge(int age){
		puppyAge = age;
	}
	
	public int getAge(){
		System.out.println("Puppy is " + puppyAge + " years old.");
		return puppyAge;
	}
	
	public static void main(String[] args){
		Puppy puppy1 = new Puppy("Jack");
		
		puppy1.setAge(11);
		
		puppy1.getAge();

		System.out.println("This value is coming from field: " + puppy1.puppyAge);
	}
	
}
